# selenium隐藏自动化特性
import time
from selenium import webdriver
from selenium.webdriver.chrome.options import Options


# 实例化操作对象
options = Options()

# 禁用自动化扩展
options.add_experimental_option('excludeSwitches', ['enable-automation'])

# 隐藏自动化特性
options.add_argument('--disable-blink-features=AutomationControlled')

# 忽略网站证书错误
options.add_argument('ignore-certificate-errors')

# 实例化谷歌浏览器对象，打开对应的网页，并设置窗口最大化
driver = webdriver.Chrome(options)
driver.get('https://www.qidian.com/')
driver.maximize_window()


time.sleep(10)
